
# -*- coding: utf-8 -*-

import json
from util.FacialRecognition import detect_faces
from controllers.BaseSocketController import BaseSocketController

class FaceDetectController(BaseSocketController):
	def process(self, cv_image):
		faces = detect_faces(cv_image)
		if len(faces) > 0:
			result = json.dumps(faces.tolist())
			self.write_message(result)
